import { RouterPath } from "@/enums/routerPath";

/**
 * sansanRouter(业务系统页面路由)
 * 说明：
 * 1. component字段不需要使用`@`动态导入，统一由menu工具类转换成菜单数据后，再转换成动态路由
 * 2. component字段规范（src/views目录下的文件路径，/开头）
 * 2. 当前文件的路由，会根据path节点寻找父级节点，如`/iot/device/detail`的所属模块可以是`/iot`或者`/iot/device`
 */
export const sansanRouter = [
	//设备详情
	{
		path: RouterPath.modbusDeviceDetail,
		name: "modbusDeviceDetail",
		component: "/iot/device/protocol/modbus",
		meta: {
			isHide: true,
			title: "设备详情"
		}
	},
	//设备详情
	{
		path: RouterPath.deviceDetail,
		name: "deviceDetail",
		component: "/iot/device/deviceDetail",
		meta: {
			isHide: true,
			title: "设备详情"
		}
	},

	//网关详情
	{
		path: RouterPath.gatewayDetail,
		name: "gatewayDetail",
		component: "/iot/gateway/gatewayDetail",
		meta: {
			isHide: true,
			title: "网关详情"
		}
	},

	//产品详情
	{
		path: RouterPath.productDetail,
		name: "productDetail",
		component: "/iot/product/productDetail",
		meta: {
			isHide: true,
			title: "产品详情"
		}
	},

	//规则详情
	{
		path: RouterPath.ruleDetail,
		name: "ruleDetail",
		component: "/iot/rule/components/ruleDetail",
		meta: {
			isHide: true,
			title: "规则详情"
		}
	},
	//规则联动
	{
		path: RouterPath.cascadeDetail,
		name: "cascadeDetail",
		component: "/iot/rule/components/cascadeDetail",
		meta: {
			isHide: true,
			title: "规则联动"
		}
	},
	//应用详情
	{
		path: RouterPath.appletDetail,
		name: "appletDetail",
		component: "/applet/components/appletDetail",
		meta: {
			isHide: true,
			title: "应用详情"
		}
	},
	//部署详情
	{
		path: RouterPath.appletDeployDetail,
		name: "appletDeployDetail",
		component: "/applet/components/nodeDetail",
		meta: {
			isHide: true,
			title: "应用部署详情"
		}
	}
];
